<?php

global $confirmType;
global $actionType;
global $organizationType;
	$year= date('Y');
	$month= date('m');
	$date= date('d');
//return;
?>
	<div class="block">

	<div class="invertedshiftdown">
		
		<ul>
			<li><a href="?page=manage_users">用户管理</a></li>
			<li><a href="?page=manage_organizations">机构管理</a></li>
			<li><a href="?page=manage_items">产品管理</a></li>
            <li class="current"><a href="?page=manage_transaction">撤销错误记录（慎用）</a></li>
 		</ul>

        <form id="myform">
			<input type="text" class="textinput" /> <input class="submit" type="submit" value="搜索" />
		</form>
	</div>
	<br style="clear: both;" />
<div id= 'content'>

<br>

		<h2>管理菲雪》操作记录显示</h2>
		
		<?php
	//print_r($_GET);'
	
	if(isset($_GET['stat'])){
		if($_GET['stat']=='denied'){
		?>
		<div class="isa_success">
			<h4>操作成功：</h4>撤销
		</div>
		
		<?php
			}elseif($_GET['stat']=='error'&&$_GET['error']=='blocked'){
		?>
		<div class="isa_error">
			<h4>操作失败：</h4>无法进行撤销操作(请查看相关库存和交易记录)
		</div>
		<?php
			}elseif($_GET['stat']=='error'&&$_GET['error']=='missing'){
		?>
		<div class="isa_error">
			<h4>操作失败：</h4>缺省数据(请确保选择了交易)
		</div>
		
			<?php
			}elseif($_GET['stat']=='error'&&$_GET['error']=='badData'){
		?>
		<div class="isa_error">
			<h4>操作失败:</h4>撤销中发生 未预料错误 请尽快联系管理员
		</div>
		<?php
		}
	}
		?>
		
			<div class="isa_info">
		<h4><?php echo $message ?></h4><?php echo $condition ?>
	</div>
		
<form action="api/" method="post">
        	<input type="hidden" id='action' name="action" value="deny_transaction" />      	

	<?php
	echo $table;
	?>
<br>

<div class="important">请务必先核对货物，然后请选中所要撤销的操作最后按下面按钮</div><br>
	<?php
if(1){
             ?>
             <div class="element" style="clear:both;">
		    <input type="submit" name="submit" value="撤销选中操作" />
             </div>
             <?php
}else{
             ?>
             <div class="element" style="clear:both;">
		    <input type="submit" name="submit" value="撤销选中操作" disabled/>
             </div>
             <?php
}
             ?>
	
	

		</form>
	
	
<h4>按条件搜索</h4>
		 <form action="" method="post">

        	
            <div class="element">
             <label class="form">扫描条码</label>
             <input type="text" id="scan_code" name="scan_code" class="text" maxlength="14" size="14"><div class="important">若为空，搜查结果会显示全部条形码</div>
            </div>
            <div class="element">
             <label class="form">物流种类</label>
<select name="actions">
	<?php
	foreach($actionType as $code=> $type){
		 echo "<option value='$code'>$type</option>";
	}
	?>
		<option value='' selected>所有</option>
</select>
            </div>
<div class="element">
             <label class="form">状态</label>
<select name="confirm">
	<?php
	foreach($confirmType as $code=> $type){
		 echo "<option value='$code'>$type</option>";
	}
	?>
	<option value='' selected>所有</option>
</select>
            </div>
             <div style="clear:both;">
             	            <div class="element">

             <label class="form">交易日期</label>
 </div>
  <li>
<label>
从
</label>
<span>
	
	
	
<select name="fromYear">
	<?php
	for($i = 2009; $i <= 2020; $i++){
		if($year==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select>
 <label for="Field103">年</label>
</span>
<span class="symbol">/</span>
<span>
<select name="fromMonth">
	<?php
	for($i = 1; $i <= 12; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	 if($month==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select><label for="Field103-1">月</label>
</span> 
<span class="symbol">/</span>
<span>
<select name="fromDate">
	<?php
   for($i = 1; $i <= 31; $i++){
   	if($i<10){
	   		$i="0".$i;
		}
	   if($date==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select>
<label for="Field103-2">日</label>
</span>



</li>

  <li>
<label>
到
</label>
<span>
	

<select name="toYear">
	<?php
	for($i = 2009; $i <= 2020; $i++){
		if($year==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select>
 <label for="Field103">年</label>
</span>
<span class="symbol">/</span>
<span>
<select name="toMonth">
	<?php
	for($i = 1; $i <= 12; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	 if($month==$i){
		 echo "<option value='$i' selected>$i</option>";
		}else{
		 echo "<option value='$i'>$i</option>";		
			
		}
	}
	?>
</select><label for="Field103-1">月</label>
</span> 
<span class="symbol">/</span>
<span>
<select name="toDate">
	<?php
	for($i = 1; $i <= 31; $i++){
		if($i<10){
	   		$i="0".$i;
		}
	   if($date==$i){
	   
		 echo "<option value='$i' selected>$i</option>";
			
		}else{
		
		 echo "<option value='$i'>$i</option>";		
		}
	}
	?>
</select>
<label for="Field103-2">日</label>
</span>



</li>
   </div>
                <div style="clear:both;">

    <div class="element">
             <label class="form">最小数量</label>
             <input type="text" id="scan_code" name="minNum" class="text" size="14"><div class="important">若为空，搜查结果会无最小数量限制</div>
            </div>
   <div style="clear:both;">

    <div class="element">
             <label class="form">最大数量</label>
             <input type="text" id="scan_code" name="maxNum" class="text" size="14" ><div class="important">若为空，搜查结果会无最大数量限制</div>
            </div>
   <br>
   <div class="element">
<input type="submit" value="递交" />
        <div class="loading"></div>
    </div>
    </form>

<br>
<br>
<br>


   
<div class="clear"></div>
	</div>